{include file="public/header" /}
<div class="page">
    <table class="ds-default-table">
        <thead>
            <tr>
                <th colspan="6">基本信息</th>
            </tr>
        </thead>
        <tr>
            <th>商品名称：</th>
            <td>{$goods_info.goods_name}</td>
            <th>货源:</th>
            <td>{$goods_info.store_name}</td>
            <th>商品分类:</th>
            <td>{$goods_info.gc_name}</td>
        </tr>
        <tr>
            <th>商品所在地：</th>
            <td>{$goods_info.two_goods_address}</td>
            <th>联系方式：</th>
            <td>{$goods_info.two_phone}</td>
            <th>商品卖价：</th>
            <td>{$goods_info.goods_price}</td>
        </tr>
        <tr>
            <th>商品品牌：</th>
            <td>{$goods_info.brand_name}</td>
            <th>数量：</th>
            <td>{$goods_info.count}</td>
            <th>卖价是否可议：</th>
            <td>{$is_price[$goods_info['two_is_price']]}</td>
        </tr>
        <tr>
            <th>商品状态：</th>
            <td>{$is_status[$goods_info['commodity_status']]}</td>
            <th>说明：</th>
            <td>{$goods_info.two_remark}</td>
            <th></th>
            <td></td>
        </tr>
        {notempty name="goods_img"}
        <tr>
            <th>图片</th>
            <td>
                {foreach name="goods_img" item="val" }
                <img src="{$val.goodsimage_url}" width="120" height="120" />
                {/foreach}
            </td>
            <th></th>
            <td></td>
            <th></th>
            <td></td>
        </tr>
        {if $goods_info.goods_status == 0}
        <form method="post" name="remark_form" id="remark_form" action="{:url('Twogoods/goods_verify')}">
            <input type="hidden" value="{$goods_info.goods_commonid}" name="commonid">
            <table class="ds-default-table nobdb">
                <tbody>
                <!-- <tr class="noborder_jia">
                    <td colspan="2" class="required"><label>加价:</label>
                        <input style="margin-left: 90px;" type='text' name='price' value='0'/>
                    </td>
                </tr> -->

                <tr class="noborder">
                    <td colspan="2" class="required vatop rowform onoff"><label>审核状态:</label>
                        <label style="margin-left: 67px;" for="rewrite_enabled_1"  class="cb-enable selected" title="{$Think.lang.ds_yes}>"><span>{$Think.lang.ds_yes}</span></label>
                        <label for="rewrite_disabled_2" class="cb-disable" title="{$Think.lang.ds_no}"><span>{$Think.lang.ds_no}</span></label>
                        <input id="rewrite_enabled_1" name="verify_state"  value="1" type="radio" checked="checked">
                        <input id="rewrite_disabled_2" name="verify_state" value="0" type="radio">
                    </td>
                </tr>

                <tr dstype="reason" style="display: none;">
                    <td colspan="2" class="required"><label for="verify_reason">违规理由:</label></td>
                </tr>
                <tr class="noborder" dstype="reason" style="display :none;">
                    <td class="vatop rowform"><textarea rows="6" class="tarea" cols="60" name="verify_reason" id="verify_reason"></textarea></td>
                </tr>
                </tbody>
                <tfoot>
                <tr class="tfoot">
                    <td colspan="2">
                        <input style="line-height: 4px;" class="btn" type="submit" value="{$Think.lang.ds_submit}"/>
                    </td>
                </tr>
                </tfoot>
            </table>
        </form>
        {/if}
        {/notempty}
    </table>
    {if $goods_info.goods_status == 2}
    <table class="ds-default-table">
        <thead>
        <tr>
            <th colspan="6">审核意见</th>
        </tr>
        </thead>
        <tr>
            <th style="width: 80px">不通过原因：</th>
            <td>{$goods_info.verify_reason}</td>
        </tr>
    </table>
    {/if}
    <script>
    // 商品审核
    function goods_verify(ids_str) {
        _uri = ADMINSITEURL+"/Twogoods/goods_verify?commonid=" + ids_str;
        dsLayerOpen(_uri,'审核','600px','400px');
    }
    </script>
    <script>
        $(function() {
            $('input[name="verify_state"]').click(function() {
                if ($(this).val() == 1) {
                    $('.noborder_jia').show();
                    $('tr[dstype="reason"]').hide();
                } else {
                    $('.noborder_jia').hide();
                    $('tr[dstype="reason"]').show();
                }
            });
        });
    </script>

</div>